﻿@model XZen.Blogger.Posting

@{
    ViewBag.Title = "CreatePosting";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>CreatePosting</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Posting</legend>

       
         
       

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Category)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Category)
            @Html.ValidationMessageFor(model => model.Category)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Body)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Body, new { rows = 15, cols = 60 })
            @Html.ValidationMessageFor(model => model.Body)
        </div>

        <div class="editor-label">
          
        </div>
        <div class="editor-field">
           @Html.HiddenFor(model => model.BlogID)
            @Html.ValidationMessageFor(model => model.BlogID)
            @Html.HiddenFor(model => model.User)
            @Html.ValidationMessageFor(model => model.User)
             @Html.HiddenFor(model => model.IP)
            @Html.ValidationMessageFor(model => model.IP)
        </div>


        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to Posting List", "Posting", new  { id=Model.BlogID }, null)
</div>

<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script>
    tinymce.init({ selector: 'textarea' });
</script>
